package com.orchard.orchardfarmmanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.time.LocalDate;
import java.util.Date;

@Entity
@Data
@TableName("agriculturaltask")
public class Task {
    @Id
    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("task_name")
    private String taskName;

    @TableField("description")
    private String description;

    @TableField("created_at")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdAt;

    @TableField("due_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dueDate;

    // 使用自定义 TypeHandler 或 @EnumValue
    @TableField(value = "status")
    private String status;

    @TableField("priority")
    private Integer priority;


}

